package com.example.demo.repository;
import com.example.demo.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

public interface UserRepository extends JpaRepository<User,Long>, JpaSpecificationExecutor<User> {

    /**
     * 根据用户名来查询用户信息
     * @param userName 用户名
     * @return 用户信息
     */
    User findByUserName(String userName);

    User findByEmail(String email);
}
